import net.vinote.smart.platform.module.security.PlatformSecurity;
import net.vinote.smart.platform.service.GeneralTools;

import org.json.JSONObject;

public class Test {
	public static void main(String[] args) throws Exception {
		String str1 = GeneralTools.decrypt("Ceb8212v999s8MFW0RjvCQ==",
			GeneralTools.getAesKey("20170901172436"));
		String user = "zjw";
		String expire = "2018-09-19";
		String token = PlatformSecurity.generateRegistrationCode(str1.getBytes(), user, expire);
		JSONObject obj = new JSONObject();
		obj.put("user", user);
		obj.put("expire", expire);
		obj.put("token", token);
		System.out.println(PlatformSecurity.encrypt(obj.toString()));
	}
}
